package run;

import java.io.File;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.PatternLayout;

import pl.czopyk.view.ViewPersister;

public class Show {

	private static final String PATTERN = "%-5p %-25c{1} : %m%n";

	public static void main(String[] args) {
		ConsoleAppender ca = new ConsoleAppender(new PatternLayout(PATTERN));
		ca.setThreshold(Level.INFO);
		BasicConfigurator.configure(ca);
		
		ViewPersister vp = new ViewPersister();
		vp.read(new File("").getAbsolutePath() + "/src/main/resources/data/all2db2users12.dat");
		vp.read(new File("").getAbsolutePath() + "/src/main/resources/data/all2db2users13.dat");
		vp.read(new File("").getAbsolutePath() + "/src/main/resources/data/all2db2users14.dat");
		vp.read(new File("").getAbsolutePath() + "/src/main/resources/data/all2db2users15.dat");
		
		vp.visualize();
	}
}
